#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string>

#include "log.h"

//daemon.h
#ifndef _DAEMON_H
#define _DAEMON_H

typedef void (*daemonRoutine) (void *) ;

class Daemon
{
private:
	std::string daemonName ;
	daemonRoutine dRoutine ;

	Log * pDLog ;

public:
	Daemon ( std::string inDaemonName, daemonRoutine inDR, Log * pInLog ) : daemonName(inDaemonName), dRoutine(inDR), pDLog(pInLog)
	{
	}
	
	int init ( ) ;
	
	void start ( void * routineParm ) ;
	
	const char * getName ( )
	{
		return daemonName.c_str() ;
	}
	
} ;

#endif
